from common.mysql.MySQLhelper import get_sql_helper

sqlhelper = get_sql_helper()


def delete_shequn_message_catch_by_user_id(user_id):
    sqlhelper.delete("DELETE from shequn_message_catch where user_id = %s", (user_id))


def get_shequn_message_catch_by_user_id(user_id):
    return sqlhelper.fetch_all(
        "select message_type from shequn_message_catch where user_id = %s; ",
        (user_id))

def get_module_id_by_user_id(user_id):
    return sqlhelper.fetch_all(
        "select catch_range from shequn_message_catch where user_id = %s; ",
        (user_id))
